package cn.com.nes.site.entity.vo.crm.sale;

import cn.com.nes.site.entity.bo.crm.sale.ChangeSaleOrderStatusBO;
import cn.com.nes.site.entity.vo.BaseVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;

@Data
public class ChangeOrderStatusVO extends BaseVO {

    /**
     * id - 订单id
     */
    @NotNull(message = "订单ID")
    private Long id;

    /**
     * 订单状态，对应字典表param_type = 302
     */
    @NotNull(message = "订单状态")
    private Integer status;

    public ChangeSaleOrderStatusBO convertToChangeSaleOrderStatusBo() {
        ChangeSaleOrderStatusBO changeSaleOrderStatusBo = new ChangeSaleOrderStatusBO();
        BeanUtils.copyProperties(this,  changeSaleOrderStatusBo);
        return changeSaleOrderStatusBo;
    }

}
